"""
@Time: 2021/1/25 下午 5:33
@Author: jinzhuan
@File: et_cn_toolkit.py
@Desc: 
"""
import torch
from cognlp import *
torch.cuda.set_device(4)


et_toolkit = EtCNToolkit(
    model_path='../../../cognlp/data/et/cluener/toolkit/model.pt',
    vocabulary_path='../../../cognlp/data/et/cluener/toolkit/vocabulary.txt',
    device=torch.device("cuda"),
    device_ids=[5],
    max_seq_length=256)
et_result = et_toolkit.run('温格的球队终于又踢了一场经典的比赛，2比1战胜曼联之后枪手仍然留在了夺冠集团之内，')
print(et_result)
